SET OBJECT MASK

This command will set a bitmask for an object, which will instruct the object whether to render to a specific camera or not.

  Syntax
SET OBJECT MASK Object Number, Camera Mask Bits
  Parameters
Object Number
Integer
The object number
Camera Mask Bits
Integer
The bitmask which specifies which cameras should render the object ( %1111 will render the object to cameras zero through three whereas %1010 will only render to cameras one and three )

  Returns

This command does not return a value.

  Description

Setting the bit to one for the camera indicated by the bit position to one means the object should be rendered, zero means the object should not be rendered.

  Example Code
set display mode 800,600,32
autocam off:backdrop off
make object sphere 1,40:position object 1,0,0,0:color object 1,255
set object mask 1,%1111
position camera 0,50,0,0:point camera 0,0,-500,0
make camera 1:position camera 1,0,0,50:point camera 1,0,0,0
make camera 2:position camera 2,0,0,50:point camera 2,0,0,0
SET CAMERA VIEW 1,0,0,400,300
SET CAMERA VIEW 2,400,300,800,600
set object mask 1,%1111:wait 1000*5:set object mask 1,%0000
do
loop
end
  See also

BASIC3D Commands Menu
Index